//
//  ConPushMessageViewController.m
//  Shengzhuli
//
//  Created by subook on 17/3/24.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "ConPushMessageViewController.h"

@interface ConPushMessageViewController ()

@end

@implementation ConPushMessageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"消息设置";
    [self createBaseView];
}
- (void) createBaseView {
    
    UIImageView *logoImageView = [[UIImageView alloc] initWithFrame:(CGRectMake(ScreenW/2-60, ScreenH/4-30, 120, 120))];
    logoImageView.layer.cornerRadius = 60;
    logoImageView.image = [UIImage imageNamed:@"logo2"];
    logoImageView.backgroundColor = [UIColor greenColor];
    [self.view addSubview:logoImageView];
    
    UILabel *label = [[UILabel alloc] initWithFrame:(CGRectMake(ScreenW/2-100, ScreenH/2-30, 200, 20))];
    label.font = [UIFont systemFontOfSize:15];
    label.text = @"已开启新消息提醒";
    label.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:label];
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:(CGRectMake(ScreenW*1/8, ScreenH/2, ScreenW*3/4, 60))];
    NSMutableAttributedString *hintString=[[NSMutableAttributedString alloc]initWithString:@"  您已开启消息提醒，如想关闭提醒，需要在iPhone的‘设置－通知－玩转地球'中手动设置"];
    //获取要调整颜色的文字位置,调整颜色
    NSRange range1=[[hintString string]rangeOfString:@"iPhone的‘设置－通知－玩转地球'"];
    [hintString addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:range1];
    label1.textColor = [UIColor grayColor];
    label1.font = [UIFont systemFontOfSize:12];
    label1.attributedText = hintString;
    label1.textAlignment = NSTextAlignmentCenter;
    label1.numberOfLines = 0;
    [self.view addSubview:label1];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
